-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up expansion #42533
Speed up expansion #42533
Conversation
9b86af6
to
1b6c57b
Compare
impl MatcherPos { | ||
fn push_match(&mut self, idx: usize, m: NamedMatch) { | ||
let matches = Rc::make_mut(&mut self.matches[idx]); | ||
matches.push(m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a lovely hack 😻
This reduces duplication, thereby increasing expansion speed.
1b6c57b
to
3d9ebf2
Compare
Pushed a theoretical fix for the run-pass-fulldeps test. I think it ran locally, but not sure. The full deps tests always get me. |
Excellent! |
📌 Commit 3d9ebf2 has been approved by |
⌛ Testing commit 3d9ebf2 with merge d9d8f66... |
💔 Test failed - status-appveyor |
@bors retry Seems like a spurious issue.
|
…yfried Speed up expansion This reduces duplication, thereby increasing expansion speed. Based on tests with rust-uinput, this produces a 29x performance win (440 seconds to 15 seconds). I want to land this first, since it's a minimal patch, but with more changes to the macro parsing I can get down to 12 seconds locally. There is one FIXME added to the code that I'll keep for now since changing it will spread outward and increase the patch size, I think. Fixes #37074. r? @jseyfried cc @oberien
☀️ Test successful - status-appveyor, status-travis |
This reduces duplication, thereby increasing expansion speed. Based on tests with rust-uinput, this produces a 29x performance win (440 seconds to 15 seconds). I want to land this first, since it's a minimal patch, but with more changes to the macro parsing I can get down to 12 seconds locally.
There is one FIXME added to the code that I'll keep for now since changing it will spread outward and increase the patch size, I think.
Fixes #37074.
r? @jseyfried
cc @oberien